﻿#ifndef MACHINEHELPER_H
#define MACHINEHELPER_H

#include <QString>
#include <QObject>
#include <QNetworkConfigurationManager>
#include <QNetworkInterface>


class MachineHelper:public QObject
{
    Q_OBJECT
public:
    MachineHelper(QObject *parent=nullptr);

    bool getNetInterfaceOnlineStatus();
    bool getPreviousOnlineState();
    static MachineHelper *GetInstance();

signals:
    void sigNetOnlineStatusChanged(bool isOnline);

private:
    static MachineHelper *mMachineHelper;

    bool mNetIsOnline = true;
    bool previousOnlineState = true;
    QNetworkConfigurationManager *m_NetMgr;

};

#endif // MACHINEHELPER_H
